package cn.edu.ctbu.sbadmin.school.dao;

import cn.edu.ctbu.sbadmin.common.core.MyMapper;

import cn.edu.ctbu.sbadmin.common.domain.MQueryParam;
import cn.edu.ctbu.sbadmin.common.domain.QueryPagePara;
import cn.edu.ctbu.sbadmin.school.domain.DimClassDO;

import com.baomidou.mybatisplus.generator.config.querys.DMQuery;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 关注公众号：MarkerHub
 * @since 2021-06-17
 */
public interface DimClassMapper extends MyMapper<DimClassDO> {
//    @Select("SELECT\n" +
//            "dim_class.id,\n" +
//            "dim_class.class_name,\n" +
//            "dim_class.class_person_number,\n" +
//            "dim_class.course_name,\n" +
//            "dim_class.course_type,\n" +
//            "dim_class.teacher_id,\n" +
//            "dim_class.term_id,\n" +
//            "dim_class.create_time,\n" +
//            "dim_term.`name` AS term_name,\n" +
//            "sys_user.truename AS user_name\n" +
//            "FROM\n" +
//            "dim_class\n" +
//            "LEFT JOIN dim_term ON dim_class.term_id = dim_term.id\n" +
//            "LEFT JOIN sys_user ON dim_class.teacher_id = sys_user.id\n")
//    public List<DimClassDO> getAll();

    /**
     * 查询视图
     * @param mQuery
     * @return
     */
    public List<DimClassDO> listView(MQueryParam mQuery);

    /**
     * 查询计数
     * @param mQuery
     * @return
     */
    public int  countView(MQueryParam mQuery);
}
